<template>
  <div class="submit-btns">
    <div></div>
    <div class="submit-btns-right">
      <el-button type="primary" class="submit-btn-add" @click="addData">
        <img class="icon-img" :src="iconAdd" alt="" />
        新增</el-button
      >
    </div>
  </div>
</template>

<script setup>
import { ref } from "vue";
import iconAdd from "@/assets/image/btn/icon-add.png";

const emits = defineEmits(["buttons"]);

const operation = ref("");

// 新增按钮
const addData = () => {
  operation.value = "add";
  emits("buttons", operation.value);
};
</script>

<style lang="less" scoped>
.submit-btns {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  .submit-btns-right {
    display: flex;
  }
  .submit-btn-add {
    background: #007aff;
    border: 1px solid #007aff;
    border-radius: 2px;
    margin-left: 12px;
    padding: 5px 16px;
  }
  .submit-btn-export {
    background: #35c362;
    border: 1px solid #35c362;
    border-radius: 2px;
    margin-left: 12px;
    padding: 5px 16px;
  }
  .icon-img {
    width: 16px;
    height: 16px;
    margin-right: 8px;
  }
}
</style>
